Skip to content

Fix interation tests executing command#6

Merged
tutunak merged 1 commit intodevelopfrom
fix-interation-tests-executing-command
Feb 1, 2026
Merged

Fix interation tests executing command#6
tutunak merged 1 commit intodevelopfrom
fix-interation-tests-executing-command

Conversation

@tutunak
Copy link
Copy Markdown
Owner

@tutunak tutunak commented Feb 1, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced jcli, a command-line tool for Jira issue management with interactive issue browsing and selection.
    • Track your current issue and auto-generate branch names from selected issues.
    • Configure and securely store Jira credentials and project defaults.
  • Chores

    • Set up automated release pipeline and cross-platform binary builds.

✏️ Tip: You can customize this high-level summary in your review settings.

@tutunak tutunak changed the base branch from master to develop February 1, 2026 08:41
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 1, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request introduces a complete Go CLI tool named jcli for interactive Jira issue management. It includes CI/CD workflows, build configuration, core CLI commands for issue selection and configuration, internal packages for Jira API communication, state and config persistence with XDG directory support, branch name generation, TUI components, and comprehensive test coverage.

Changes

Cohort / File(s) Summary
CI/CD & Build Automation
.github/workflows/ci.yaml, .github/workflows/release.yaml, .goreleaser.yaml, Makefile
Establishes automated testing (unit + integration), linting, multi-platform builds, and semantic versioning-driven releases with GitHub Actions and GoReleaser configuration.
Project Setup
go.mod, .gitignore
Declares Go module github.com/dk/jcli with dependencies (huh, yaml.v3) and indirect transitive deps; excludes binaries, build artifacts, IDE files, and OS metadata.
Documentation
README.md, CLAUDE.md
Comprehensive project documentation covering features, installation, configuration, usage examples, command reference, development setup, and architectural guidance for Code interactions.
CLI Routing & Entry Point
main.go, cmd/root.go, cmd/issue.go, cmd/config.go
Root command dispatcher routing to version, help, issue, and config subcommands; issue dispatches to select, current, branch; config manages project, status, credentials, and display.
Issue Command Handlers
cmd/issue_select.go, cmd/issue_current.go, cmd/issue_branch.go
Implements issue selection (direct by key or interactive), current issue display, and branch name generation via loaded state and Jira client.
Configuration Management
internal/config/config.go, internal/config/config_test.go
Loads/saves YAML configuration from XDG paths; validates Jira credentials and defaults; applies environment variable overrides; includes unit tests for paths, persistence, validation, and env merging.
Jira API Client
internal/jira/types.go, internal/jira/client.go, internal/jira/client_test.go
Defines Issue, Status, User domain models and SearchResult; implements HTTPClient with Basic Auth, JQL-based search, and issue retrieval; includes HTTP mock server tests.
Mock Jira Client
internal/jira/mock.go
Provides MockClient for testing with in-memory issue storage, search filtering by status, and NotFoundError handling.
Application State
internal/state/state.go, internal/state/state_test.go
Persists selected issue (key, summary, timestamp) to XDG state directory; supports load, save, set, clear, and query operations with comprehensive tests.
Branch Name Generation
internal/branch/generator.go, internal/branch/generator_test.go
Generates branch names combining issue key, normalized summary (lowercased, Unicode-handled, hyphenated, truncated), and random suffix; configurable RNG for testing.
TUI Components
internal/tui/selector.go, internal/tui/selector_test.go
Interactive issue selection and credential prompt forms using huh; SelectIssue displays truncated summaries and returns chosen issue; PromptCredentials collects Jira URL, email, and token.
Integration Tests
tests/integration/integration_test.go
End-to-end CLI test with mock Jira server; validates version, help, config initialization, credential setup, issue selection, current issue display, and branch generation.

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as CLI (root.go)
    participant Cmd as issue_select.go
    participant Config as config.go
    participant Client as jira/client.go
    participant TUI as tui/selector.go
    participant State as state.go
    participant Branch as branch/generator.go

    User->>CLI: jcli issue select
    CLI->>Cmd: executeIssueSelect(args)
    Cmd->>Config: Load()
    Config-->>Cmd: config
    Cmd->>State: Load()
    State-->>Cmd: state
    alt Direct selection by key
        Cmd->>Client: GetIssue(key)
        Client-->>Cmd: issue
    else Interactive selection
        Cmd->>Client: SearchIssues(project, status)
        Client-->>Cmd: issues[]
        Cmd->>TUI: SelectIssue(issues)
        TUI-->>Cmd: selected issue
    end
    Cmd->>State: SetCurrentIssue(key, summary)
    Cmd->>State: Save()
    State-->>Cmd: saved
    Cmd-->>User: issue selected confirmation

    User->>CLI: jcli issue branch
    CLI->>Cmd: executeIssueBranch(args)
    Cmd->>State: Load()
    State-->>Cmd: state with current issue
    Cmd->>Branch: Generate(key, summary)
    Branch-->>Cmd: branch name
    Cmd-->>User: branch-name-output
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A CLI is born from code so fine,
With Jira's dance and branches aligned,
Config persists, state remembers the way,
Interactive forms guide us each day,
From issue to branch, the workflow takes flight! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-interation-tests-executing-command

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tutunak tutunak merged commit 659c465 into develop Feb 1, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant